<template>
  <div class="feature-container">
    <div class="feature-grid">
      <div class="module">
      <div class="feature-content feature-item feature-item-1">
          <h3>{{ features[0].title }}</h3>
          <p>{{ features[0].desc }}</p>
        </div>
      </div>
      <div class="module2">
        <div class="feature-content feature-item feature-item-2" >
            <h3>{{ features[1].title }}</h3>
            <p>{{ features[1].desc }}</p>
        </div>
        <div class="feature-content feature-item feature-item-3" >
            <h3>{{ features[2].title }}</h3>
            <p>{{ features[2].desc }}</p>
        </div>
      </div>
    </div>
    
    <!-- <div class="feature-grid"> -->
      <!-- <div v-for="(feature, index) in features" 
           :key="index"
           class="feature-item"
           :class="`feature-item-${index+1}`">
        <div class="feature-content">
          <h3>{{ feature.title }}</h3>
          <p>{{ feature.desc }}</p>
        </div>
        <div class="feature-icon" v-html="feature.icon"></div>
      </div>
    </div> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      features: [
        { 
          title: '报告解读', 
          desc: '查看报告，智慧解读',
          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="120" viewBox="0 0 24 24" fill="none" stroke="#4a86e8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 13H8"></path><path d="M16 17H8"></path><path d="M10 9H8"></path></svg>'
        },
        { 
          title: '疾病知识', 
          desc: '疾病辅助诊断',
          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="120" height="40" viewBox="0 0 24 24" fill="none" stroke="#5eaaa8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>'
        },
        { 
          title: '项目咨询', 
          desc: '咨询送检项目',
          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="#f0b917" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>'
        }
      ]
    }
  }
}
</script>

<style scoped lang="scss">
.feature-container {
  width: 100%;
  margin:0 auto;
  // margin: 0px 16px 10px 16px;
  // height:280px;
  // box-sizing: border-box;
  border-radius: 24px;
  padding: 10px;
  background: variables.$bg-color;
 
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); */
}
.feature-grid {
  display: flex;
  gap: 10px;
}
.module,.module2 {
  flex:1;
}

.feature-item {
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-sizing: content-box;
  
}

.feature-item-1 {
  height:170px;
  background-color: #e8f4fd;
}
.module2{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-item-2 {
  height:40px;
  background-color: #e6f6f6;
}

.feature-item-3 {
  height:40px;
  background-color: #fff9e6;
}

.feature-content {
  flex: 1;
}

.feature-icon {
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

h3 {
  color: #333;
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

p {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
}

@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
</style>